feat(operations-gen): add zkSync bytecode support [CLD-2780]#1049
Conversation
🦋 Changeset detectedLatest commit: 9348b7f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
9e739f1 to
90625f2
Compare
There was a problem hiding this comment.
Pull request overview
This PR extends tools/operations-gen to support zkSync VM deploy bytecode alongside standard EVM bytecode, so generated Deploy operations can deploy correctly on zkSync VM chains.
Changes:
- Adds
zksync_bytecode(per-contract) andinput.zksync_bindings_package(default package) to the EVM config schema and documents them. - Updates the EVM codegen pipeline + template to optionally emit
Bytecode{ZkSyncVM: ...}and import zkSync bytecode symbols from either gobindings or a dedicated package. - Adds unit + golden tests and test fixtures covering package resolution and generated output.
Reviewed changes
Copilot reviewed 14 out of 16 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tools/operations-gen/testdata/evm/zksync_bindings/bytecode.go | Adds zkSync bytecode fixture symbol for tests |
| tools/operations-gen/testdata/evm/operations_gen_mcms_config.yaml | Extends MCMS config fixture with zkSync bindings package + bytecode symbol |
| tools/operations-gen/testdata/evm/operations_gen_link_token_zksync_config.yaml | Adds a new fixture config for zkSync bytecode generation |
| tools/operations-gen/testdata/evm/many_chain_multi_sig.golden.go | Updates golden output to include ZkSyncVM bytecode + import |
| tools/operations-gen/testdata/evm/link_token_zksync.golden.go | Adds golden output for LinkToken with zkSync bytecode |
| tools/operations-gen/testdata/evm/gobindings/v1_0_0/link_token/link_token.go | Adds zkSync bytecode fixture symbol inside gobindings testdata |
| tools/operations-gen/README.md | Documents new config fields and constraint with omit_deploy |
| tools/operations-gen/internal/families/evm/zksync_bytecode.go | Implements YAML parsing + package/symbol resolution for zkSync bytecode |
| tools/operations-gen/internal/families/evm/zksync_bytecode_test.go | Adds unit tests for YAML parsing, resolution, and omit_deploy rejection |
| tools/operations-gen/internal/families/evm/evm_test.go | Adds integration test for resolving relative zksync_bindings_package |
| tools/operations-gen/internal/families/evm/evm_golden_test.go | Adds golden test for LinkToken zkSync bytecode generation |
| tools/operations-gen/internal/families/evm/contract.go | Threads resolved zkSync bytecode (package+symbol) into contract IR |
| tools/operations-gen/internal/families/evm/config.go | Adds new YAML config fields for zkSync bytecode |
| tools/operations-gen/internal/families/evm/codegen.go | Extends template data with zkSync bytecode fields and import logic |
| tools/operations-gen/generate/templates/evm/operations.tmpl | Emits optional zkSync bytecode import and ZkSyncVM: field |
| .changeset/clear-beans-deny.md | Declares a minor version bump for operations-gen feature |
Files not reviewed (2)
- tools/operations-gen/testdata/evm/link_token_zksync.golden.go: Generated file
- tools/operations-gen/testdata/evm/many_chain_multi_sig.golden.go: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
75ed314 to
369e649
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 16 changed files in this pull request and generated 3 comments.
Files not reviewed (2)
- tools/operations-gen/testdata/evm/link_token_zksync.golden.go: Generated file
- tools/operations-gen/testdata/evm/many_chain_multi_sig.golden.go: Generated file
369e649 to
fef2b6c
Compare
…ation Enable operations-gen to wire zkSync VM deploy bytecode into generated Deploy operations via zksync_bytecode and zksync_bindings_package config fields.
fef2b6c to
42d710a
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 16 changed files in this pull request and generated no new comments.
Files not reviewed (2)
- tools/operations-gen/testdata/evm/link_token_zksync.golden.go: Generated file
- tools/operations-gen/testdata/evm/many_chain_multi_sig.golden.go: Generated file
ajaskolski
left a comment
There was a problem hiding this comment.
one small comment but overall looks good to me
9348b7f
Summary
In order to use operations-gen cli to generate the deploy operations for MCMS contracts , we need to support zksync.
Adds zkSync VM deploy bytecode support to
operations-genso generated EVMDeployoperations can include both EVM and zkSync bytecode.Config:
Closes CLD-2780.